<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript">
	$(function() {
		parent.$.messager.progress('close');

		$('#form').form({
			url : '/residenceController/dispatchResource',
			onSubmit : function() {
				parent.$.messager.progress({
					title : '提示',
					text : '数据处理中，请稍后....'
				});
				var isValid = $(this).form('validate');
				if (!isValid) {
					parent.$.messager.progress('close');
				}
				return isValid;
			},
			success : function(result) {
				try{
					parent.$.messager.progress('close');
					result = $.parseJSON(result);
					if (result.success) {
						parent.$.modalDialog.openner_dataGrid.datagrid('reload');
						parent.$.modalDialog.handler.dialog('close');
					}  else {
						parent.$.messager.alert("提示",result.msg,"info");
					}
				} catch(e){
						parent.$.messager.alert("提示",result,"info");
				}
			}
		});
	});
</script>
<div class="easyui-layout" data-options="fit:true,border:false">
	<div data-options="region:'center',border:false" title="" style="overflow: hidden;">
	<form id="form" method="post" style="width: 100%;height: 100%">
			<input value="${role.id }" name="id" type="hidden"/>
			<table class="table table-hover table-condensed"  style="width: 100%;height: 100%">
				<tr>
				<th>选择小区</th>
						<td>
						<input name="residenceId"  value="${role.residenceId } " type="hidden"/>
						<input name="residencName" value="${ role.residenceName}"  style="width:380px" readonly="readonly"/>
						</td>
				</tr>
				<tr>
					<th>角色名称</th>
					<td><input name="name" type="text" placeholder="请输入角色名称" value="${role.name }" class="easyui-validatebox span2"   style="width:380px" data-options="required:true"  /></td>
				</tr>
				<tr>
					<th>排序</th>
					<td>	<input class="easyui-slider"  name="sortWeight" value="${role.sortWeight }" style="width:380px" data-options="min:1,max:100,showTip:true" />
				</tr>
				<tr>
					<th>备注</th>
					<td colspan=""><textarea name="remark" rows="" cols="" class="span5"   style="width:380px">${role.remark }</textarea></td>
				</tr>
			</table>
		</form>
	</div>
</div>